const { default: request } = require('../../utils/request');
Page({
  data: {
    notice: {}
  },
  async onLoad(options) {
    const id = options.id;
    let tasks=await request.get("notices/");
    const notice = tasks.find(item => item.id == id);
    if (notice) {
      this.setData({
        notice: {
          title: notice.title,
          content: notice.contentDetail
        }
      });
    }
  }
})    